<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:url('detail/index')}">用户列表</a></li>
		</ul>
		<form class="well form-inline margin-top-20" method="post" action="{:url('detail/index')}">
			昵称:
			<input type="text" class="form-control" name="u_nickname" value="{$u_nickname}" placeholder="请输入昵称">
			手机号:
			<input type="number" class="form-control" name="u_phone" value="{$u_phone}" placeholder="请输入手机号">
			<input type="submit" class="btn btn-primary" value="搜索" />
			<a class="btn btn-danger" href="{:url('detail/index')}">清空</a>
		</form>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="50">ID</th>
					<th>用户昵称</th>
					<th>手机号</th>
					<th>性别</th>
					<th>年龄</th>
					<th>余额</th>
					<th>经验值</th>
					<th>观看记录</th>
					<th>获礼记录</th>
					<th>注册日期</th>
					<th width="90">操作</th>
				</tr>
			</thead>
			<tbody>
			<foreach name="detail" item="vo">
				<tr>
					<td>{$vo.id}</td>
					<td>{$vo.u_nickname}</td>
					<td>{$vo.u_phone}</td>
					<td>{$vo.u_sex}</td>
					<td>{$vo.u_age}</td>
					<td>{$vo.u_balance/100}</td>
					<td>{$vo.u_score}</td>
					<td><a href='{:url("detail/watch",array("id"=>$vo["id"]))}'>观看记录</a></td>
					<td><a href='{:url("detail/obtain",array("id"=>$vo["id"]))}'>获礼记录</a></td>
					<td>{$vo.u_createtime}</td>
					<td>
						<a href='{:url("detail/info",array("id"=>$vo["id"]))}'>详细</a> |
						<if condition="$vo['u_status'] eq 10">
							<a href="{:url('detail/enabled',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="您确定要禁用此用户吗？">启用</a>
							<else />
							<a href="{:url('detail/enabled',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="您确定要启用此用户吗？"><b style="color: red">停用</b></a>
						</if>
					</td>
				</tr>
			</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>